<script type="text/javascript">
function checkit(form)
{
    document.getElementById("username_imgchk").style.display = "";
    document.getElementById("usernice_imgchk").style.display = "";
    document.getElementById("useremail_pwd").style.display = "";
    document.getElementById("useremail_tpwd").style.display = "";
    document.getElementById("useremail_imgchk").style.display = "";
    if(form.user_name.value==""){
        alert("请输入用户名！");
        form.user_name.focus();
        return(false);
    }else if(form.user_name.value.length<6){
        alert("用户名字符过短！");
        form.user_name.focus();
        return(false);
    }else if(form.user_name.value.length>12){
        alert("用户名字符过长！");
        form.user_name.focus();
        return(false);
    }else{
       document.getElementById("username_imgchk").src = "/images/reg_right.jpg";
    }
    if(form.user_nice.value==""){
        alert("请输入昵称！");
        form.user_nice.focus();
        return(false);
    }else if(form.user_nice.value.length<6){
        alert("昵称字符过短！");
        form.user_nice.focus();
        return(false);
    }else if(form.user_nice.value.length>12){
        alert("昵称字符过长！");
        form.user_nice.focus();
        return(false);
    }else
       document.getElementById("usernice_imgchk").src = "/images/reg_right.jpg";
    if(form.password.value==""){
        alert("请输入密码！");
        form.password.focus();
        return(false);
    }else if(form.password.value.length<6){
        alert("用户密码字符过短！");
        form.password.focus();
        return(false);
    }else  if(form.password.value.length>12){
        alert("用户密码字符过长！");
        form.password.focus();
        return(false);
    }else
       document.getElementById("useremail_pwd").src = "/images/reg_right.jpg";
    if(form.repassword.value==""){
        alert("请输入重复密码！");
        form.repassword.focus();
        return(false);
    }else if(form.password.value!=form.repassword.value){
        alert("密码与重复密码不同！");
        form.repassword.focus();
        return(false);
    }else
    document.getElementById("useremail_tpwd").src = "/images/reg_right.jpg";
    if(form.user_email.value==""){
        alert("请输入电子邮件！");
        form.user_email.focus();
        return(false);
    }else if(form.user_email.value!=""){
        if(form.user_email.value.match(/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/)==null){
            alert("请输入正确的E-mail地址！");
            form.user_email.focus();
            return(false);
        }
    }else
    document.getElementById("useremail_imgchk").src = "/images/reg_right.jpg";
    form.password.value=$.md5(form.password.value);

}

</script>
<form method="post" id="form" name="form"  onsubmit=" return checkit(this);">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td colspan="2">修改会员信息：<input name="a2" class="sear01" onclick="javascript:history.go(-1);" type="button" value="返回列表" /></td>
		  </tr>
      <tr>
			<td colspan="2">&nbsp;<p></p></td>
		  </tr>
      <tr>
			<td>登录账号：</td>
			<td><input type="text" class="ipt211" id="user_name"  name="user_name" ><span id="chak_user">*长度在6-12位之间<img id="username_imgchk" style="display:none" src="/images/reg_wrong.jpg" /></span></td>
		  </tr>
      <tr>
          <td class="newsTd">昵&nbsp;&nbsp;&nbsp;&nbsp;称：</td>
          <td><input type="text" class="ipt211" id="user_nice"  name="user_nice" ><span id="chak_nice">*长度在6-12位之间<img style="display:none" id="usernice_imgchk" src="/images/reg_wrong.jpg" /></span></td>
      </tr>
      <tr>
          <td class="newsTd">登录密码：</td>
          <td><input type="password" class="ipt211" name="password" ><span id="chak_pwd">*密码长度在6-12位之间<img style="display:none" id="useremail_pwd" src="/images/reg_wrong.jpg" /></span></td>
      </tr>
      <tr>
          <td class="newsTd">确认密码：</td>
          <td><input type="password" class="ipt211" name="repassword"><span id="chak_repwd">*请再次输入密码<img style="display:none" id="useremail_tpwd" src="/images/reg_wrong.jpg" /></span></td>
      </tr>
      <tr>
          <td class="newsTd">电子邮件：</td>
          <td><input type="text" class="ipt211" id="user_email" name="user_email" ><span id="chak_email">*格式为xxx@xxx.com<img style="display:none" id="useremail_imgchk" src="/images/reg_wrong.jpg" /></span></td>
      </tr>
      <tr>
          <td class="newsTd">性&nbsp;&nbsp;&nbsp;&nbsp;别：</td>
          <td><input type="radio" name="sex" checked="" value="male" >男&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="female" >女</td>
      </tr>
      <tr>
          <td colspan="2"><input name="a1" class="sear01" type="submit" value="提&nbsp;交" />　　<input name="a2" class="sear01" type="reset" value="重&nbsp;置" />　　<input name="a2" class="sear01" onclick="javascript:history.go(-1);" type="button" value="返回列表" /></td>
      </tr>
      </table>
    </form>